
<style>
/*
http://bbs.blueidea.com/thread-2957802-1-1.html
*/
ul.track {
float:left;
text-align:left;
}
.track li {
width:100%;
text-align:left;
list-style-position:inside;
list-style-type:disc;
}
li.buy {
color:red;
}
li.sell {
color:green;
}
li span.text {
color:black;
}

</style>

<?php
elgg_load_library('elgg:portfolio');
$tableArray = widget_get_latest_trades();
//print_r($tableArray);
/*echo elgg_view('output/tablesorter', 
	array(
		'value' => $tableArray,
		'tableid' => 'tradetrack'
	)
);*/

echo "<ul class='track'>";
foreach($tableArray as $tblRows){
	foreach($tblRows as $tblHead => $tblCells){
		if ($tblHead == 'B/S') {
			if ($tblCells=='B') {
				echo "<li class='buy'>";
			} else {
				echo "<li class='sell'>";
			}
			echo "<span class='text' style='width:15px;display:-moz-inline-box;display:inline-block;'>$tblCells</span> ";
		} else if ($tblHead == 'Ticker') {
			$xray_url = elgg_get_site_url()."xray/$tblCells";
			echo "<a target='_blank' href='$xray_url'>$tblCells";
		} else if ($tblHead == 'Name') {
			echo " $tblCells</a>";
		} else {
			echo " <span class='text'>@ $tblCells</span>";
		}
	}
	echo '</li>';
}
echo '</ul>';